#include<iostream>
#include<string>
using namespace std;
int main()
{
	string str;
	int count = 0;
	cin >> str;
	while (str != "done")
	{
		count++;
		cin >> str;
	}
	cout << count << "words\n";
	return 0;
}
